// ---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "BaseAddForm.h"
// ---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "BaseDialogForm"
#pragma link "cxGraphics"
#pragma link "cxLocalization"
#pragma resource "*.dfm"
TUBaseAddForm *UBaseAddForm;

// ---------------------------------------------------------------------------
__fastcall TUBaseAddForm::TUBaseAddForm(TComponent* Owner) : TUBaseDialogForm
(Owner) {
	ViewConfig = "";
}

// ---------------------------------------------------------------------------
void __fastcall TUBaseAddForm::CreateComponent() {
	if (ViewConfig == "") {
		if (EditGridIndex == FirstGridIndex)
			TUBaseDialogForm::BuildView(ModuleInfo.Conf, "//Grid/Add");
		else
			TUBaseDialogForm::BuildView(ModuleInfo.Conf, "//Grid[last()]/Add");
	}
	else
		TUBaseDialogForm::BuildView(ViewConfig);
}

// ---------------------------------------------------------------------------
